package priv.lirenhe.javasuper.net;

import java.io.IOException;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class TCPServerTest {

	public TCPServerTest() {
		
	}

	public static void main(String[] args) {
		try {
			ServerSocket server = new ServerSocket(7788);
			Socket client = server.accept();
			
			OutputStream os = client.getOutputStream();
//			client.getInputStream();
			
			os.write("welcome".getBytes());
			
			os.close();
			client.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		
	}
}
